import json


# 加载配置文件
class Config:
    def __init__(self, url="./config.json"):
        self.__data__ = None
        self.load(url)

    def load(self, url):
        with open(url, encoding='utf-8') as file:
            config = json.load(file)

        for key in config:
            self.__setattr__(key, config[key])
